<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS定位</title>
    <link rel="stylesheet" href="css/style2.css">
    <link rel="stylesheet" href="css/style2color.css">
</head>
<body>
    <div class="div1_static">
        <h1>static定位</h1>
        <div class="box_red"></div>
        <div class="box_green"></div>
        <div class="box_blue"></div>
    </div>
    <div class="div1_fix">
        <h1>fix定位</h1>
        <div class="box_red2">本块将采用fix定位</div>
        <div class="box_green2"></div>
        <div class="box_blue2"></div>
    </div>
    <div class="box_red_sticky"></div>
    <div class="div1_relative">
        <h1>relative定位</h1>
        <div class="box_red">本块将采用relative定位</div>
        <div class="box_green"></div>
        <div class="box_blue"></div>
    </div>
    <div class="div1_abs">
        <h1>absolute定位</h1>
        <div class="box_red">本块将采用absolute定位</div>
        <div class="box_green"></div>
        <div class="box_blue"></div>
    </div>
</body>
</html>